package LFhalf {
	class charAction {
		private var mChar:phyObject;
		public function charAction(_mChar:phyObject):void {
			mChar = _mChar;
		}
		public function doSkill():Boolean 
		{
			return false
		}
		public function doRun():Boolean 
		{
			if (mChar.curerntInput.directX != 0 && 
				(mChar.curerntInput.directState == 6 || mChar.curerntInput.directState == 7)) {
				if (mChar.curerntInput.press('A')) {
					FrameMachine.jumpFrame(mChar, "run_attack");
				}else {
					FrameMachine.jumpFrame(mChar, "run");
				}
			}
			//mChar.curerntInput
			return false
		}
		public function doDash():Boolean
		{
			return false
		}
		public function doJump():Boolean 
		{
			return false
		}
		public function doDefend():Boolean 
		{
			if (mChar.currentState==1) {
				FrameMachine.jumpFrame(mChar, "defend");
			}else {
				FrameMachine.jumpFrame(mChar, "row");
			}
			return false
		}
		public function doWalk():Boolean 
		{
			if (mChar.curerntInput.direct!=5) {
				//mChar.speed.x+=mChar.curerntInput.directX*mChar.data.getData('sp_walk_x');
				//mChar.speed.z+=mChar.curerntInput.directY*mChar.data.getData('sp_walk_z');
				FrameMachine.jumpFrame(mChar, "walk");
			}
			return false
		}
		public function doCatch():Boolean 
		{
			return false
		}
		public function doAttack():Boolean 
		{
			if (mChar.curerntInput.press('A')) {
				//do jumpframe
				switch (mChar.currentState) {
					case 2:
						FrameMachine.jumpFrame(mChar, "run_attack");
					break;
					case 4:
						//jump sky attack
					break;
					case 6:
						//jump dash attack
					break;
					case 7:
						//jump dashback attack
					break;
					default:
						//jump normal attack
				}
				return true;
			}
			return false;
		}
		public function doItem():Boolean 
		{
			if (char(mChar).currentItem) {
				return true;
			}
			return false
		}
	}
}